package web.dao.impls;

import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;

import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import map.beans.WmsServerBean;
import web.dao.interfaces.WmsDaoInterface;


@Repository("wmsDao")
@Transactional(readOnly = true)
public class WmsDaoImpl implements WmsDaoInterface {
	@PersistenceContext
	private EntityManager entityManager;

	@Override
	public List<WmsServerBean> findAllWms() {

		TypedQuery<WmsServerBean> query = entityManager.createQuery("SELECT g FROM User g ORDER BY g.id", WmsServerBean.class);
		return query.getResultList();
	}

}
